<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page isELIgnored="false"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>">
<title>TradeList</title>
<meta http-equiv="X-UA-Compatible" content="IE=9" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />

<link href="resources/css/home.css" rel="stylesheet" type="text/css" />
<link href="http://tjs.sjs.sinajs.cn/t3/style/css/common/card.css"
	type="text/css" rel="stylesheet" />
<link href="resources/css/jqtransform.css" rel="stylesheet"
	type="text/css" />
<link href="resources/css/jquery.ui.all.css" rel="stylesheet"
	type="text/css" />
<script type="text/javascript" src="resources/js/jquery-1.6.2.js"></script>
<script type="text/javascript" src="resources/js/sina/wb.js"></script>
<script type="text/javascript" src="resources/js/common.js"></script>
<script src="resources/js/jquery.jqtransform.js" type="text/javascript"></script>
<script src="resources/js/jquery.ui.core.js" type="text/javascript"></script>
<script src="resources/js/jquery.ui.widget.js" type="text/javascript"></script>
<script src="resources/js/jquery.ui.mouse.js" type="text/javascript"></script>
<script src="resources/js/jquery.ui.slider.js" type="text/javascript"></script>
<script>
	$(document).ready(function() {
		var rewardSlider = $("#rewardSlider").slider({
			min : 3,
			max : 7,
			range : "min",
			animate : true,
			slide : function(event, ui) {
				$("#reward").val(ui.value);
			}
		});
		$("#reward").change(function() {
			rewardSlider.slider("value", $(this).val());
		});
		rewardSlider.slider("option", "value", $("#unitPrice").val());
		$("#reward").val($("#unitPrice").val());
		var creditSlider = $("#creditSlider").slider({
			min : 0,
			max : 10,
			range : "min",
			animate : true,
			slide : function(event, ui) {
				$("#credit").val(ui.value);
			}
		});
		$("#credit").change(function() {
			creditSlider.slider("value", $(this).val());
		});
		creditSlider.slider("option", "value", $("#creditRate").val());
		$("#credit").val($("#creditRate").val());
	});

	function toMain() {
		window.location.href = "trademanage/showTradeList.do";
	}
</script>
</head>
<body style="background: #fff">
	<div style="margin: 10px 5px 5px 5px">
		<div class="twiendingHalf">
			<div style="padding: 100px 100px 0 200px">
				<h3 style="margin: 5px 0 30px 80px">设置悬赏信息</h3>
				<form action="trademanage/createTrade.do?type=common" method="post"
					name="form">
					<table style="font-size: 16px">
						<tr style="height: 60px">
							<td>悬赏单价：</td>
							<td><input type="hidden" id="unitPrice"
								value="${userBean.ttTradeinfo.unitPrice }" /> <select
								name="reward" id="reward"
								style="margin: 5px 0 10px 5px; width: 60px">
									<option value="3">3</option>
									<option value="4">4</option>
									<option value="5">5</option>
									<option value="6">6</option>
									<option value="7">7</option>
							</select>
								<div id="rewardSlider"
									style="width: 200px; margin: 0 0 5px 15px"></div>
							</td>
						</tr>
						<tr style="height: 60px">
							<td>允许信誉：</td>
							<td><input type="hidden" id="creditRate"
								value="${userBean.ttTradeinfo.creditRate }" /><select
								name="credit" id="credit"
								style="margin: 5px 0 10px 5px; width: 60px">
									<option value="0">0</option>
									<option value="1">1</option>
									<option value="2">2</option>
									<option value="3">3</option>
									<option value="4">4</option>
									<option value="5">5</option>
									<option value="6">6</option>
									<option value="7">7</option>
									<option value="8">8</option>
									<option value="9">9</option>
									<option value="10">10</option>
							</select>
								<div id="creditSlider"
									style="width: 200px; margin: 0 0 5px 15px"></div></td>
						</tr>
						<tr style="height: 30px">
							<td colspan="2" style="text-align: center"><input
								type="submit" value="确定" /> <input type="button" value="取消"
								onclick="toMain()" />
							</td>
						</tr>
					</table>
				</form>
			</div>
		</div>
	</div>
</body>